package com.lhz.project.system.mapper.auth;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhz.common.page.BaseQueryParam;
import com.lhz.project.system.model.entity.auth.Account;
import com.lhz.project.system.model.entity.auth.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LiHuaZhi
 * @since 2020-06-12 22:30:48
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    User selectByPrimaryKey(String id);

    /**
     * 查询列表
     *
     * @param param
     * @return
     */
    List<User> listUser(BaseQueryParam param);


    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    int deletePhyByPrimaryKey(String id);

    /**
     * 批量逻辑删除
     *
     * @param list
     * @return
     */
    int deletePhyByPrimaryKeys(@Param("list") List<String> list);

    /**
     * 插入账户
     *
     * @param account
     * @return
     */
    int insertAccount(Account account);

    /**
     * 删除账户
     *
     * @param id
     * @return
     */
    int deletePhyAccountByPrimaryKey(String id);

    /**
     * 删除账户
     *
     * @param list
     * @return
     */
    int deletePhyAccountByPrimaryKeys(@Param("list") List<String> list);
}